package com.link2room.rodimus.service.impl;

import com.link2room.common.dao.ICommonDao;
import com.link2room.rodimus.entity.SalesmanBase;
import com.link2room.rodimus.entity.SalesmanMappingEntity;
import com.link2room.rodimus.service.ISalesmanService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by LN on 2017/12/26
 */
@Component("salesmanService")
public class SalesmanServiceImpl implements ISalesmanService {
    @Resource
    private ICommonDao commonDao;
    @Override
    @Transactional
    public void salesmanLeadin(List<SalesmanBase> salesmans, List<SalesmanMappingEntity> salesmanMappingEntityList) throws Exception {
        commonDao.saveList(salesmans);
        commonDao.saveList(salesmanMappingEntityList);
    }
}
